package com.stefanini.worldcupinformation.controladores.team;

import com.stefanini.worldcupinformation.ejbs.TeamDao;
import com.stefanini.worldcupinformationpersistence.entities.Equipo;
import java.io.Serializable;
import java.util.List;
import javax.ejb.EJB;
import javax.enterprise.context.SessionScoped;
import javax.inject.Named;

/**
 *
 * @author Emmanuel
 */
@Named("teamAdmin")
@SessionScoped
public class TeamAdmin implements Serializable{
    private static final long serialVersionUID = 1L;
    
    @EJB
    private TeamDao teamDao;
    
    private List<Equipo> teams;
    
    public void init(){
        this.teams = this.teamDao.getAll();
    }
    
    public List<Equipo> getTeams() {
        return teams;
    }
    
}
